﻿using AutoMapper;
using lwzlz.Application.System.Dto;
using lwzlz.Core;

namespace lwzlz.Application.AutoMapper
{
    /// <summary>
    /// 
    /// </summary>
    public class SystemProfile : Profile
    {
        /// <summary>
        /// 
        /// </summary>
        public SystemProfile()
        {
            #region 菜单
            CreateMap<Menu, ButtonOutput>();
            CreateMap<Menu, MenuOutput>();
            CreateMap<MenuInput, Menu>();
            CreateMap<ButtonInput, Menu>();
            CreateMap<Menu, AuthorityMenuDto>();
            #endregion

            #region 角色
            CreateMap<RoleInput, Role>();
            CreateMap<Role, RoleOutput>();
            #endregion

            #region 用户
            CreateMap<UserInput, User>();
            CreateMap<User, UserOutput>();
            #endregion

            #region 数据配置
            CreateMap<Code, CodeOutput>();
            CreateMap<CodeInput, Code>();
            CreateMap<CodeType, CodeTypeOutput>();
            CreateMap<CodeTypeInput, CodeType>();
            #endregion

            #region 商品
            CreateMap<CategoryInput, Category>();
            CreateMap<CommodityInput, Commodity>();
            #endregion

            #region 账户
            CreateMap<MemberInput, Member>();
            CreateMap<AddressInput, Address>();
            CreateMap<Address, AddressInfoOutput>();
            #endregion

            #region 订单
            CreateMap<OrderInput, Order>();
            CreateMap<Order, OrderListOutput>();
            CreateMap<OrderRecordInput, OrderRecord>();
            #endregion

            #region 购物车
            CreateMap<ShoppingCartInput, ShoppingCart>();
            CreateMap<ShoppingCart, ShoppingCartOutput>();
            #endregion

            #region 门店
            CreateMap<StoreInput, Store>();
            CreateMap<Store, StoreOutput>();
            #endregion

            #region 老师
            CreateMap<TeacherInput, Teacher>();
            CreateMap<Teacher, TeacherOutput>();
            #endregion

            #region 学生
            CreateMap<StudentInput, Student>();
            CreateMap<Student, StudentOutput>();
            #endregion

            #region 字体
            CreateMap<FontInput, Font>();
            CreateMap<Font, FontOutput>();
            #endregion

            #region 合同
            CreateMap<ContractInput, Contract>();
            CreateMap<Contract, ContractOutput>();
            #endregion

            #region 姓名贴
            CreateMap<StickerInput, Sticker>();
            CreateMap<Sticker, StickerOutput>();
            #endregion
            
        }
    }
}
